﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;

namespace Admin2020.Core.Domain.Core
{
    /// <summary>
    /// 用户
    /// </summary>
    public class Users:BaseEntity
    {
        /// <summary>
        /// 用户名
        /// </summary>
        [Column("user_name")]
        public string UserName { get; set; }

        /// <summary>
        /// 密码（加密）
        /// </summary>
        [Column("password")]
        public string PassWord { get; set; }

        /// <summary>
        /// 盐
        /// </summary>
        [Column("salt")]
        public string Salt { get; set; }

        /// <summary>
        /// 昵称
        /// </summary>
        [Column("nick_name")]
        public string NickName { get; set; }

        /// <summary>
        /// 头像地址
        /// </summary>
        [Column("avatar_url")]
        public string AvatarUrl { get; set; }

        /// <summary>
        /// 电子邮箱
        /// </summary>
        [Column("email")]
        public string Email { get; set; }

        /// <summary>
        /// 手机号
        /// </summary>
        [Column("telephone")]
        public string Telephone { get; set; }

        /// <summary>
        /// 最后登录时间
        /// </summary>
        [Column("last_login_time")]
        public DateTime? LastLoginTime { get; set; }

        /// <summary>
        /// 最后登录IP
        /// </summary>
        [Column("last_login_ip")]
        public string LastLoginIp { get; set; }

        /// <summary>
        /// 失败登录次数
        /// </summary>
        [Column("failed_login_numbers")]
        public int FailedloginNumbers { get; set; }

        /// <summary>
        /// 当前状态id
        /// </summary>
        [Column("current_status")]
        public int CurrentStatus { get; set; }

        /// <summary>
        /// 用户角色
        /// </summary>
        public ICollection<UserRole> UserRole { get; set; }
    }
}
